// 封装相关客户列表
import request from '@/utils/request'

// 获取客户列表
export function getclients(params) {
  return request({
    url: '/clients',
    params
  })
}

//删除客户
export function delclients(id){
   return request({
     url:`/clients/${id}`
     ,method:'delete'
   })
}


//新增客户
export function addclients(data){
   return request({
     url:'/clients',
     method:'post',
     data
   })
}

// 获取指定客户（详情）
export function customer(id){
  return request({
      url:`/clients/${id}`
  })
}

// 编辑客户
export function ditclients(data){
  return request({
    url:'/clients/'+data.id
    ,method:'put'
    ,data
  })
}

// 获取客户数量
export function getclientNumber(params){
   return request({
     url:'/clients/count',
     params
   })
}